//
//  MCBodyDataStatisticsTableCell.swift
//  MCBodyBuildingPro
//
//  Created by Renlvshijie on 2023/6/6.
//

import UIKit
import QMUIKit


class MCBodyDataStatisticsTableCell: UITableViewCell {

    @IBOutlet weak var titleInfoLabel: UILabel!
    
    var lineChartView: MJLineChartView!
    
    @IBOutlet weak var backGroudView: UIView!
    @IBOutlet weak var labelLayoutView: QMUIFloatLayoutView!
    
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
        lineChartView = MJLineChartView.init(frame: .zero)
        var configuration = MJLineChartConfiguration()
        configuration.yMin = 0
        configuration.yMax = 50
        configuration.ySegmentCount = 5
        configuration.xMin = 1
        configuration.xMax = 31
        configuration.xSegmentCount = 8
        configuration.yAxisAlarmLineMaxValue = 31
        configuration.yAxisAlarmLineMinValue = 1
        lineChartView.setupLineChartView(frame: backGroudView.bounds, configuration: configuration)
        backGroudView.addSubview(lineChartView)
        
        var pointArray: [MJLineChartLineSource] = []
        var point: MJLineChartLineSource = MJLineChartLineSource()
        
        point.xAxisValue = 0
        point.yAxisValue = 20
        point.xValue = "0:00"
        pointArray.append(point)
        
       
        lineChartView.addLine(values: pointArray)
        
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    
}
